<?php
namespace Common\Model;
use Think\Model\ViewModel;
class OrdersViewModel extends ViewModel{
   public $viewFields = array(
     'Orders'=>array('_table'=>'__ORDERS__'.YEAR, '_type'=>"LEFT"),
	 'Delivery'=>array('_table'=>'__DELIVERY__'.YEAR,'_on'=>"Orders.order_id=Delivery.dv_oid","_type"=>"LEFT"),
	 'Tracking'=>array('_on'=>'Delivery.dv_tk_id=Tracking.tk_company'),
     'Merchant'=>array('_on'=>'Merchant.mh_id=Orders.order_mid'),
	 'Site'=>array('_on'=>'Site.site_id=Orders.order_siteid'),
	 'Channels'=>array('_on'=>'Channels.cn_id=Orders.order_channel'),
   );
}